package com.shenyong.ladmin.service.Impl;

import com.shenyong.ladmin.entity.Blogroll;
import com.shenyong.ladmin.mapper.BLogFriendMapper;
import com.shenyong.ladmin.result.Page;
import com.shenyong.ladmin.service.BLogFriendService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author
 * @site
 * @company
 * @create
 */
@Service
public class BLogFriendServiceImpl implements BLogFriendService {
    @Autowired
    private BLogFriendMapper bLogFriendMapper;
    @Override
    public Map<String, Object> BLogFrienfindAll(Page page) {
        Map<String,Object> map=new HashMap<String,Object>();
        map.put("code",0);
        map.put("msg","");
        map.put("count",bLogFriendMapper.BLogFrienCount());
        map.put("data",bLogFriendMapper.BLogFrienfindAll(page));
        return map;
    }

    @Override
    public int BLogFrienCount() {
        return bLogFriendMapper.BLogFrienCount();
    }

    @Override
    public int BLogFriensave(Blogroll blogroll) {
        return bLogFriendMapper.BLogFriensave(blogroll);
    }

    @Override
    public int BLogFrienUpdate(Blogroll blogroll) {
        return bLogFriendMapper.BLogFrienUpdate(blogroll);
    }

    @Override
    public int BLogFrienDelete(int id) {
        return bLogFriendMapper.BLogFrienDelete(id);
    }
}
